import req from '../fetch/index.js'

const config = {
  // 获取表格信息
    getTableData: {
        url: '/pc/driver/listDriver',
        method:'post'
  },
  // 新增司机信息
  addDriver: {
    url: '/pc/driver/addDriver',
    method:"post"
  },
  // 删除司机
  deleteDriver: {
    url: '/pc/driver/deleteDriver',
    method:'post'
  },
  // 查询司机详情
  getDriverDetail: {
    url: '/pc/driver/getDriverDetail',
    method:'post'
  },
  // 查询司机
  getDriver:{
    url: '/pc/driver/getDriver',
    method:'post'
  },
  // 修改司机
updateDriver: {
  url: '/pc/driver/updateDriver',
  method:'post'
  },
  // 查询省下拉框接口
  listProvince: {
    url: '/pc/dictory/listProvince',
    method:'post'
  },
  // 查询市数据
  listCity: {
    url: '/pc/dictory/listCity',
    method:'post'
  },
  // 查询区
  listDistrict: {
    url: '/pc/dictory/listDistrict',
    method:'post'
  },
  
}

const request = function (funcName, requestParam) {
  return req(config[funcName].url, config[funcName].method, requestParam, {}, config[funcName].fileConfig)
}
export default request
